//
//  HOUtils.h
//  WeiDu_1_0
//
//  Created by foguo-mac-1 on 01/07/16.
//  Copyright (c) 2016 WeiDu Energy Tech. All rights reserved.
//

#import "HOBaseObject.h"
#import <UIKit/UIKit.h>
#import "HODefine.h"
@class HOMessageEntity;
@interface HOUtils : HOBaseObject

+ (CGFloat)getScreenWidth;
+ (CGSize)getScreenSize;
+ (CGFloat)getScreenHeight;
+ (CGFloat)getStatusBarHeight;

+ (UIImage *)createImageWithColor:(UIColor *)color forView:(UIView *)view;
+ (UIImage*)imageWithImage:(UIImage*)image
              scaledToSize:(CGSize)newSize;
+ (UIImage *)scaleImage:(UIImage *)image toScale:(CGSize)scaleSize;


+ (UIImage *)createImageWithColor:(UIColor *)color forRect:(CGRect)rect;
+ (NSTimeInterval) getCurrentTime;
+ (BOOL)validePhoneNuber:(NSString *)number;
+ (BOOL) validateIdentityCard: (NSString *)identityCard;
+ (BOOL) validateEmail:(NSString *)email;
+ (BOOL) validateDomain:(NSString *)domain;

+ (NSString *)getEducationByIndex:(int)index;

+ (NSString *)getDateFromTimeInterval:(NSTimeInterval)timeInterval;
+ (NSString *)getDateFromTimeInterval2:(NSTimeInterval)timeInterval;
+ (NSString *)getDateFromTimeInterval3:(NSTimeInterval)timeInterval;
+ (NSString *)getDateFromTimeIntervalChinese:(NSTimeInterval)timeInterval;
+ (NSString *)getDateFromTimeInterval4:(NSTimeInterval)timeInterval;
+ (NSString*)base64Encode:(NSString*)text;
+ (NSString*)base64Decode:(NSString*)text;

+ (UIFont *)fontWithSize:(CGFloat)size;
+ (CGFloat)getTitleWidth:(NSString *)title withFont:(UIFont *)font;
+ (UIColor *)getStatusColorOfTemplate:(int)status;

+(UIImage *) imageCompressForWidth:(UIImage *)sourceImage targetWidth:(CGFloat)defineWidth;
+ (NSString *)getValideString:(NSString *)string;

+ (NSString*)dictionaryToJson:(NSDictionary *)dic;
+ (NSString*)arrayToJson:(NSArray *)array;
+ (NSString*)getCurrentDateForFileName;
+ (NSString*)getCurrentDate;
+ (double)getTimeStampByTimeStr:(NSString *)timeStampStr;
+ (NSArray *)arrayWithJsonString:(NSString *)jsonString;

+ (CGFloat)defaultOnePixelConversion;

//获取发布时间段
+ (NSString *)getTimestampFromString:(NSString *)timestampStr;

+ (NSString *)getL10WithRawString:(NSString *)rawString withKeyString:(NSString *)keyString;


+ (NSString *)getAgeFromBirthday:(NSString *)birthday;
+ (void)playMidi;
+ (void)removeFromSuperViewForViews:(UIView *)view, ...;

+ (NSString *)getFilePathWithFileName:(NSString *)fileName withFolderPath:(NSString *)folderPath withExtension:(NSString *)ext;
+ (NSString *)getVoiceFilePathWithFileName:(NSString *)fileName;
+ (NSString *)getVoiceFolderPath;
+ (NSString *)getUserFolderPath;
+ (NSString *)getWavAudioFolderPath;

+ (BOOL)isExistFileInLocal:(NSString *)filePath;
+ (BOOL)deleteAudioFromLocal:(NSString *)fileName withFileType:(NSString *)fileType;
+ (NSArray *)getReportOrderStatus;
+ (NSString *)getDescribtionWithStatus:(HO_REPORT_ORDER_STATUS)status;
+ (BOOL)saveAudioIntLocal:(NSData *)data withFilePath:(NSString *)filePath;
+ (UIColor *)getOrderColorWithStatus:(HO_REPORT_ORDER_STATUS)status;

+ (NSString *)getWavAudioWithFileName:(NSString *)fileName;

+ (NSString *)getStatisticsTitle:(HO_STATISTICS_TYPE)type;

+ (NSString *)getTrimingString:(NSString *)content;
+ (CGSize)findHeightForText:(NSString *)text havingWidth:(CGFloat)widthValue andFont:(UIFont *)font;

+ (NSAttributedString *)getAttributedStringWithFirstContent:(NSString*)firstContent
											 withFirstColor:(UIColor *)firstColor
											  withFirstFont:(UIFont *)firstFont
										  withSecondContent:(NSString*)secondContent
											withSecondColor:(UIColor *)secondColor
											 withSecondFont:(UIFont *)secondFont;
+ (NSAttributedString *)getAttributedStringWithTitle:(NSString*)strFirst withContent:(NSString *)strSecond withColor:(UIColor *)color;
+ (void)callPhoneNumber:(NSString *)phoneNumber;

+ (NSData *)returnDataWithDictionary:(NSDictionary *)dict;
+ (NSDictionary *)returnDictionaryWithDataPath:(NSString *)path;
+ (NSArray *)readLocalFileWithName:(NSString *)name;
+ (BOOL)removeLocalFileWithName:(NSString *)name;
@end
